package ctrip.common


/**
 * Created by gongenbo on 2017/5/22.
 */
object LineParser {
  def parseLine(schema: Array[String], contents: Array[String]): Map[String, String] = {
    var rsMap: Map[String, String] =Map()
    var i: Int = 0
    while (i < schema.length) {
      print("i:",i)
      rsMap+=(schema(i)->contents(i))
      i+=1
    }
    rsMap
  }
  def main(args: Array[String]): Unit = {
    var a:Map[String,Int]=Map("k1"->1,"k2"->2)//初始化构造函数
    a += ("k3"->3)//添加元素
    a += ("k4"->4)//添加元素
    print("a",a)
  }
}
